package com.wang.lotterysystem.controller.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 活动状态枚举
 */
@AllArgsConstructor
@Getter
public enum ActivityStatusEnum {

    RUNNING(1,"进行中"),
    COMPLETED(2,"已完成");

    private Integer code;

    private String message;

    public static ActivityStatusEnum checkForName(String name){
        for (ActivityStatusEnum activityStatusEnum : ActivityStatusEnum.values()) {
            if (activityStatusEnum.name().equalsIgnoreCase(name)){
                return activityStatusEnum;
            }
        }
        return null;
    }
}
